function init(canvas, ctx) {
    let ww = canvas.width = window.innerWidth
    let wh = canvas.height = window.innerHeight
    ctx.width = ww
    ctx.height = wh
    window.addEventListener('resize', function () {
        ww = canvas.width = window.innerWidth
        wh = canvas.height = window.innerHeight
    })
}